import json
import app
def common_assert(testcase,resp,status_code,success,code,message):
    testcase.assertEqual(status_code, resp.status_code)
    testcase.assertEqual(success, resp.json().get("success"))
    testcase.assertEqual(code, resp.json().get("code"))
    testcase.assertIn(message, resp.json().get("message"))


def read_json_file(filename):
    with open(filename,mode="r",encoding="utf_8")as f:
        jsonData=json.load(f)
        print(jsonData)
        list1=[]
        for reqData in jsonData:
            list1.append(tuple(reqData.values()))
        print(list1)
        return list1
if __name__ == '__main__':
    json_file = app.BASE_DIR + "/data/" + "login_data.json"
    read_json_file(json_file)
